import random

def combSort(A):
	N = len(A)
	swapped = True

	while N > 1 or swapped:
		N = int(N / 1.3)
		N = N if N > 1 else 1

		swapped = False
		for k in range(len(A) - N):
			t = k + N
			if A[k] > A[t]:
				A[k], A[t] = A[t], A[k]
				swapped = True
	return A




A = [random.randint(1, 20) for k in range(20)]
print combSort(A)